package com.fausto.learnimprint.domain

import com.fausto.learnimprint.BlogApplicationTests
import com.fausto.learnimprint.core.service.impl.UserService
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import javax.servlet.http.HttpServletRequest

class UserTests: BlogApplicationTests() {

    @Autowired
    lateinit var userService: UserService

    @Autowired
    lateinit var request: HttpServletRequest
    /**
     *      测试通过用户名获取用户信息(缓存处理)
     */
    @Test
    fun findUserCache(){
        println(userService.findUserFromContext())
    }
}